//
//  ZDHomeSectionHeader.m
//  特种车调度
//
//  Created by 陈宇 on 15/8/18.
//
//

#import "ZDHomeSectionHeader.h"

@interface ZDHomeSectionHeader ()

@end

@implementation ZDHomeSectionHeader

+ (instancetype)homeSectionHeader
{
    return [[NSBundle mainBundle] loadNibNamed:@"ZDHomeSectionHeader" owner:self options:nil].firstObject;
}

- (void)setHeaderAction:(void (^)())headerAction
{
    _headerAction = headerAction;
    
    [self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(headerTap)]];
}

- (void)headerTap
{
    if (_headerAction) {
        _headerAction();
    }
}

@end
